"""
Author: HuWen
@file: page_environment_management_info.py
@dateTime: 2025/7/7 15:44
加油加油！！！
"""
from playwright.sync_api import Page
from common.base_page import BasePage
from common.logger import logger
from locators.basicSecurityInformation.loc_environment_management_info import LocatorEnterpriseEnvironmentManagement


class EnterpriseEnvironmentManagementPage(BasePage):
    def __init__(self, page: Page):
        super().__init__(page)
        self.switch_menu('安全基础管理')


    def edit_environment_management_info(self):
        logger.info("环境管理信息")
        self.click(LocatorEnterpriseEnvironmentManagement.loc_enterprise_profile_menu)
        self.click(LocatorEnterpriseEnvironmentManagement.loc_environment_management_tab)
        logger.info("点击编辑按钮")
        self.click(LocatorEnterpriseEnvironmentManagement.loc_edit_button)
        self.select(LocatorEnterpriseEnvironmentManagement.loc_environment_risk_level,"红")
        self.select(LocatorEnterpriseEnvironmentManagement.loc_disposal_method,"无危害处置")
        self.select(LocatorEnterpriseEnvironmentManagement.loc_permit_type,"排污许可证")
        self.click(LocatorEnterpriseEnvironmentManagement.loc_is_key_polluter_yes)
        self.click(LocatorEnterpriseEnvironmentManagement.loc_submit_button)